package com.ninjia.common.pojo;

/**
 * Created by xiabin on 2017/8/14.
 */
public class APIResult {

    private int resultCode;

    private String resultMsg;

    private Object data;

    private APIResult() {
    }

    public APIResult(ErrorDict err) {
        resultCode = err.getCode();
        resultMsg = err.getMsg();
    }

    public APIResult(Object resData) {
        resultCode = 0;
        resultMsg = "OK";
        data = resData;
    }

    public APIResult(String msg) {
        this.resultCode = 0;
        this.resultMsg = msg;
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}